package com.yunke.vo.user;

import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;

import java.math.BigDecimal;
import java.util.List;

/**
 * 个人中心首页VO
 * 
 * @author yunke
 * @since 1.0.0
 */
@Data
@Schema(description = "个人中心首页信息")
public class YunkeUserCenterVo {

    /**
     * 用户基本信息
     */
    @Schema(description = "用户基本信息")
    private UserInfo userInfo;

    /**
     * 统计数据
     */
    @Schema(description = "统计数据")
    private StatisticsInfo statistics;

    /**
     * 财务信息
     */
    @Schema(description = "财务信息")
    private FinanceInfo finance;

    /**
     * 等级信息
     */
    @Schema(description = "等级信息")
    private LevelInfo level;

    /**
     * 邀请信息
     */
    @Schema(description = "邀请信息")
    private InviteInfo invite;

    /**
     * 功能菜单
     */
    @Schema(description = "功能菜单")
    private List<MenuItem> menuItems;

    /**
     * 用户基本信息
     */
    @Data
    @Schema(description = "用户基本信息")
    public static class UserInfo {
        @Schema(description = "用户ID")
        private Long userId;

        @Schema(description = "昵称")
        private String nickname;

        @Schema(description = "头像")
        private String avatar;

        @Schema(description = "性别：0-未知 1-男 2-女")
        private Integer gender;

        @Schema(description = "VIP等级")
        private Integer vipLevel;

        @Schema(description = "是否实名认证")
        private Boolean isAuth;

        @Schema(description = "个人简介")
        private String bio;

        @Schema(description = "注册时间")
        private Long registerTime;
    }

    /**
     * 统计数据
     */
    @Data
    @Schema(description = "统计数据")
    public static class StatisticsInfo {
        @Schema(description = "关注数")
        private Integer followCount;

        @Schema(description = "粉丝数")
        private Integer fansCount;

        @Schema(description = "获赞数")
        private Integer likeCount;

        @Schema(description = "动态数")
        private Integer circleCount;

        @Schema(description = "搭子数")
        private Integer daziCount;

        @Schema(description = "服务数")
        private Integer serviceCount;
    }

    /**
     * 财务信息
     */
    @Data
    @Schema(description = "财务信息")
    public static class FinanceInfo {
        @Schema(description = "余额")
        private BigDecimal balance;

        @Schema(description = "累计收入")
        private BigDecimal totalIncome;

        @Schema(description = "累计支出")
        private BigDecimal totalExpense;

        @Schema(description = "待到账金额")
        private BigDecimal pendingAmount;

        @Schema(description = "可提现金额")
        private BigDecimal withdrawableAmount;
    }

    /**
     * 等级信息
     */
    @Data
    @Schema(description = "等级信息")
    public static class LevelInfo {
        @Schema(description = "当前等级")
        private Integer currentLevel;

        @Schema(description = "当前经验值")
        private Integer currentExp;

        @Schema(description = "下一级所需经验")
        private Integer nextLevelExp;

        @Schema(description = "等级名称")
        private String levelName;

        @Schema(description = "等级图标")
        private String levelIcon;

        @Schema(description = "进度百分比")
        private Integer progressPercent;
    }

    /**
     * 邀请信息
     */
    @Data
    @Schema(description = "邀请信息")
    public static class InviteInfo {
        @Schema(description = "邀请码")
        private String inviteCode;

        @Schema(description = "邀请链接")
        private String inviteUrl;

        @Schema(description = "已邀请人数")
        private Integer inviteCount;

        @Schema(description = "累计佣金")
        private BigDecimal totalCommission;
    }

    /**
     * 功能菜单项
     */
    @Data
    @Schema(description = "功能菜单项")
    public static class MenuItem {
        @Schema(description = "菜单ID")
        private String id;

        @Schema(description = "菜单名称")
        private String name;

        @Schema(description = "菜单图标")
        private String icon;

        @Schema(description = "跳转链接")
        private String url;

        @Schema(description = "角标数量")
        private Integer badgeCount;

        @Schema(description = "是否显示")
        private Boolean visible;
    }
} 